/**
 * @param {number[]} nums
 * @return {boolean}
 */
var isStraight = function (nums) {
    nums.sort((a, b) => a - b);
    let zero = 0;
    for (let i = 0; i < 4; i++) {
        if (nums[i] == 0) zero++;
        else if (nums[i] == nums[i + 1]) return false;
    }
    return nums[4] - nums[zero] < 5;
};
